#!/usr/bin/env python3
"""
Setup script for MarkLocalize
"""

from setuptools import setup, find_packages
import os

# Read the contents of README file
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

# Read requirements
with open(os.path.join(this_directory, 'requirements.txt'), encoding='utf-8') as f:
    requirements = [line.strip() for line in f if line.strip() and not line.startswith('#')]

setup(
    name="marklocalize",
    version="1.0.0",
    author="yxl-sz-gd-ch",
    author_email="",
    description="A comprehensive media localization tool for Markdown files",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/yxl-sz-gd-ch/MarkLocalize",
    project_urls={
        "Bug Reports": "https://github.com/yxl-sz-gd-ch/MarkLocalize/issues",
        "Source": "https://github.com/yxl-sz-gd-ch/MarkLocalize",
        "Documentation": "https://github.com/yxl-sz-gd-ch/MarkLocalize#readme",
    },
    packages=find_packages(),
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: End Users/Desktop",
        "Topic :: Text Processing :: Markup",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Multimedia",
        "Topic :: Software Development :: Documentation",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Operating System :: Microsoft :: Windows",
        "Environment :: X11 Applications :: Qt",
    ],
    python_requires=">=3.7",
    install_requires=requirements,
    extras_require={
        "dev": [
            "pytest>=6.0",
            "pytest-qt>=4.0",
            "black>=21.0",
            "flake8>=3.8",
            "mypy>=0.800",
        ],
    },
    entry_points={
        "console_scripts": [
            "marklocalize=MarkLocalize:main",
        ],
        "gui_scripts": [
            "marklocalize-gui=MarkLocalize:main",
        ],
    },
    include_package_data=True,
    package_data={
        "": ["*.ico", "*.png", "*.json"],
    },
    keywords=[
        "markdown",
        "media",
        "localization",
        "download",
        "images",
        "videos",
        "audio",
        "documents",
        "gui",
        "pyqt5",
    ],
    zip_safe=False,
)